//
//  SecondViewController.m
//  OCIOSDemo
//
//  Created by Caldremch on 2018/5/28.
//  Copyright © 2018年 Caldremch. All rights reserved.
//

#import "SecondViewController.h"
#import "OtherView.h"

@interface SecondViewController ()

@end

@implementation SecondViewController

- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{
    
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    
    if (self) {
        self.title = @"Second";
    }
    
    return self;
    
    
}


- (void)loadView{
    
    
    UIView *baseView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds] ];
    
    baseView.backgroundColor = [UIColor yellowColor];
    self.view = baseView;
    
    _subView2 = [[UIView alloc] initWithFrame:CGRectMake(60, 100, 200, 200)];
    
    _subView2.backgroundColor = [UIColor blueColor];
    
    [self.view addSubview: _subView2];
    
    OtherView *other = [[OtherView alloc] initWithFrame:CGRectMake(100, 350, 100, 100)];
    
    other.backgroundColor = [UIColor brownColor];
    
    [self.view addSubview:other];
    
    
    
    
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
